﻿@{
    ViewBag.Title = "List";
}

<h2>List</h2>
 <table cellspacing="0"  class="listTable" id="postList">
				
					<thead>
						<tr>
							
							<th>id</th>
							<th>cityname</th>
							<th>countryid</th>
							
                         
                           
						</tr>
					</thead>
					
					<tbody>
                      @foreach (var item in ViewBag.data)
                      { 
						<tr>
							
							
							<td valign="middle" align="center">@item.CityID</td>
                            <td valign="middle" align="center">@item.NameCity</td>
                            @if (item.CounTryID == 2)
                            {
							<td valign="middle" align="center">Việt Nam</td>
                            }
                            else
                            {
                            <td valign="middle" align="center">@item.CounTryID</td>
                            }
						</tr>
                      }
						
					</tbody>
					<!-- /Tbody -->
				</table>